package com.kaishengit.action;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.springframework.beans.factory.annotation.Autowired;

import com.kaishengit.pojo.Deal;
import com.kaishengit.service.DealService;
import com.opensymphony.xwork2.ActionSupport;

@Namespace("/deal")
public class DealAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private List<Deal> dealList;
	private DealService dealService;
	
	@Action("list")
	public String execute() {
		dealList = dealService.findAll();
		return SUCCESS;
	}
	
	
	
	public List<Deal> getDealList() {
		return dealList;
	}
	public void setDealList(List<Deal> dealList) {
		this.dealList = dealList;
	}
	public DealService getDealService() {
		return dealService;
	}
	@Autowired
	public void setDealService(DealService dealService) {
		this.dealService = dealService;
	}
	
	
}
